import "./index.scss";

export default function VideoPlayer({ src, visible, setVideoVisible }) {
  return (
    visible && (
      <div class="x-window-mask modal dark-in dashboard-intro-mask">
        <div class="video-wrapper">
          <video
            class="intro-video"
            autoplay="autoplay"
            controls
            muted
            src={src}
          ></video>
          <div class="close-btn">
            <i
              class="iconfont icon-close-normal"
              onClick={() => setVideoVisible(false)}
            ></i>
          </div>
        </div>
      </div>
    )
  );
}
